import request from '@/utils/request'
import { renderUrl } from '../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function add(data) {
  return request({
    url: '/carriage/add',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function edit(data) {
  return request({
    url: '/carriage/update',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}
export function del(data) {
  return request({
    url: '/carriage/del',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function getCarriageList(data) {
  return request({
    url: '/carriage/list',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

// export function toDisableAndOpen (params) {
//   return request({
//     url: '/carriage/update/status',
//     method: 'POST',
//     params
//   })
// }

export default { add, edit,del }
